package com.zhima.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zhima.entity.OjQuestionBindBank;
import com.zhima.vo.QuestionBankContestEditQuestionVO;
import com.zhima.vo.QuestionTableVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author zhima
 * @since 2023-08-25
 */
@Mapper
public interface OjQuestionBindBankMapper extends BaseMapper<OjQuestionBindBank> {

    List<QuestionTableVO> queryQuestionsByQuestionBankId(@Param("questionBankId") Long questionBankId);

    List<QuestionBankContestEditQuestionVO> queryQuestionBankSimpleQuestion(@Param("questionBankId") Long questionBankId);

    boolean decreaseQuestionIndex(@Param("questionBankId") Long questionBankId, @Param("questionIndex") Integer questionIndex);

    boolean changeQuestionIndex(@Param("questionBankId") Long questionBankId, @Param("questionNumber") String questionNumber, @Param("questionIndex") Integer questionIndex);
}
